<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<div>
<ul id="left_menuTree" class="ztree"></ul>
<br/>
</div>

<SCRIPT type="text/javascript">

	var left_setting = {
		check: {
			enable: false
		},
		data: {
			simpleData: {
				enable: true
			}
		},
        callback: {
            onClick: left_onTreeClick
        }
	};
	
	function left_onTreeClick(event, treeId, treeNode, clickFlag) {
// 		alert("[ " + getTime() + " event: " + clickFlag + "treeId:" + treeId + "treeNode:" + treeNode 
// 		         + "clickFlag:" + clickFlag);
// 		alert(treeNode.id);
// 		alert(treeNode.pId);
// 		alert(treeNode.name);
// 		alert(treeNode.mtrUrl);
 		load_main_content(treeNode.mtrUrl);
	}
	
// 	function getTime() {
// 	    var now = new Date(),
// 		h = now.getHours(),
// 		m = now.getMinutes(),
// 		s = now.getSeconds();
// 	    return (h + ":" + m + ":" + s);
// 	}

 	var left_Nodes =[
		{ id:1, pId:0, name:"功能菜单", open:true},
		{ id:11, pId:1, name:"组织权限中心", open:true},
		{ id:111, pId:11, name:"组织管理", mtrUrl:"/org/organization/manage.action"},
		{ id:112, pId:11, name:"人员管理", mtrUrl:"/org/person/manage.action"},
		{ id:113, pId:11, name:"应用管理", mtrUrl:"/org/app/manage.action"},
		
		{ id:114, pId:11, name:"功能管理", mtrUrl:"/org/function/manage.action"},
		{ id:115, pId:11, name:"角色管理", mtrUrl:"/org/role/manage.action"},
		{ id:116, pId:11, name:"组织授权", mtrUrl:"/org/grant/manage.action"},

		{ id:12, pId:1, name:"随意勾选 1-2", open:true},	
		{ id:121, pId:12, name:"随意勾选 1-2-1"},	
		{ id:123, pId:12, name:"异常测试", mtrUrl:"/ca/userManage123.action"},			
		
		{ id:2, pId:0, name:"随意勾选 2", checked:true, open:false},
		{ id:21, pId:2, name:"随意勾选 2-1"},
		{ id:22, pId:2, name:"随意勾选 2-2", open:true},
		{ id:221, pId:22, name:"随意勾选 2-2-1", checked:true},
		{ id:222, pId:22, name:"随意勾选 2-2-2"},
		{ id:23, pId:2, name:"随意勾选 2-3"}
	]; 

	var left_Nodes = ${left_listFunction};

	$(document).ready(function(){
		$.fn.zTree.init($("#left_menuTree"), left_setting, left_Nodes);
	});
			
</SCRIPT>